/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * IPanelControl.java
 *
 * Created on 05-jul-2012, 16:06:10
 */
package Test;

import javax.swing.JOptionPane;

/**
 *
 * @author myguel
 */
public class IPanelControl extends javax.swing.JInternalFrame {

    /** Creates new form IPanelControl */
    public IPanelControl() {
        initComponents();
        dchCalendario.getDayChooser().addMouseListener(new java.awt.event.MouseAdapter() {
            
            @Override
            public void mouseClicked(java.awt.event.MouseEvent evt) {
//                jDayChooser1MouseClicked(evt);
                JOptionPane.showMessageDialog(pnlContenedor, "HelloWorld!");
            }
        });
        
        dchCalendario.getDayChooser().addPropertyChangeListener(
                new java.beans.PropertyChangeListener() {
                    
                    @Override
                    public void propertyChange(
                            java.beans.PropertyChangeEvent evt) {
//                        JOptionPane.showMessageDialog(pnlContenedor, "HelloWorld!");
                        if(evt.getPropertyName().compareTo("day")==0) {
                            
                        }
//                        System.out.println();
                    }
                });
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mnuToolBar = new javax.swing.JToolBar();
        btnCobranza = new javax.swing.JButton();
        btnTomarPedidos = new javax.swing.JButton();
        btnProforma = new javax.swing.JButton();
        btnCotizacion = new javax.swing.JButton();
        btnDevolucion = new javax.swing.JButton();
        btnRegistroSello = new javax.swing.JButton();
        pnlContenedor = new javax.swing.JPanel();
        lblAgenda = new javax.swing.JLabel();
        pnlCalendario = new javax.swing.JPanel();
        dchCalendario = new com.toedter.calendar.JCalendar();
        pnlPedidos = new javax.swing.JPanel();
        pnlDetalle = new javax.swing.JPanel();
        lblClaseRiesgo = new javax.swing.JLabel();
        lblLimiteCredito = new javax.swing.JLabel();
        lblDisponible = new javax.swing.JLabel();
        txtClaseRiesgo = new javax.swing.JTextField();
        txtLimiteCredito = new javax.swing.JTextField();
        txtDisponible = new javax.swing.JTextField();
        pnlTabla = new javax.swing.JPanel();
        scrListado = new javax.swing.JScrollPane();
        tblAgenda = new javax.swing.JTable();

        setClosable(true);
        setIconifiable(true);
        setMaximizable(true);
        setResizable(true);
        setTitle("Panel Control - Proffline");

        mnuToolBar.setFloatable(false);
        mnuToolBar.setRollover(true);

        btnCobranza.setText("Cobranza");
        btnCobranza.setFocusable(false);
        btnCobranza.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnCobranza.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        mnuToolBar.add(btnCobranza);

        btnTomarPedidos.setText("Tomar Pedidos");
        btnTomarPedidos.setFocusable(false);
        btnTomarPedidos.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnTomarPedidos.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        mnuToolBar.add(btnTomarPedidos);

        btnProforma.setText("Proforma");
        btnProforma.setFocusable(false);
        btnProforma.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnProforma.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        mnuToolBar.add(btnProforma);

        btnCotizacion.setText("Cotización");
        btnCotizacion.setFocusable(false);
        btnCotizacion.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnCotizacion.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        mnuToolBar.add(btnCotizacion);

        btnDevolucion.setText("Devoluciones");
        btnDevolucion.setFocusable(false);
        btnDevolucion.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnDevolucion.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        mnuToolBar.add(btnDevolucion);

        btnRegistroSello.setText("Registro Sello");
        btnRegistroSello.setFocusable(false);
        btnRegistroSello.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnRegistroSello.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        mnuToolBar.add(btnRegistroSello);

        getContentPane().add(mnuToolBar, java.awt.BorderLayout.PAGE_START);

        pnlContenedor.setLayout(new java.awt.BorderLayout());

        lblAgenda.setBackground(new java.awt.Color(175, 200, 222));
        lblAgenda.setFont(new java.awt.Font("Tahoma", 1, 18));
        lblAgenda.setText("AGENDA");
        lblAgenda.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 5, 1, 1));
        lblAgenda.setOpaque(true);
        pnlContenedor.add(lblAgenda, java.awt.BorderLayout.PAGE_START);

        pnlCalendario.add(dchCalendario);

        pnlContenedor.add(pnlCalendario, java.awt.BorderLayout.LINE_END);

        pnlDetalle.setBackground(new java.awt.Color(204, 204, 204));
        pnlDetalle.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 153)));
        pnlDetalle.setLayout(new java.awt.GridLayout(2, 3, 5, 5));

        lblClaseRiesgo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblClaseRiesgo.setText("Clase Riesgo");
        pnlDetalle.add(lblClaseRiesgo);

        lblLimiteCredito.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblLimiteCredito.setText("Límite de Crédito");
        pnlDetalle.add(lblLimiteCredito);

        lblDisponible.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblDisponible.setText("Disponible");
        pnlDetalle.add(lblDisponible);

        txtClaseRiesgo.setEditable(false);
        txtClaseRiesgo.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtClaseRiesgo.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 153)));
        txtClaseRiesgo.setOpaque(false);
        pnlDetalle.add(txtClaseRiesgo);

        txtLimiteCredito.setEditable(false);
        txtLimiteCredito.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtLimiteCredito.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 153)));
        txtLimiteCredito.setOpaque(false);
        pnlDetalle.add(txtLimiteCredito);

        txtDisponible.setEditable(false);
        txtDisponible.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtDisponible.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(153, 153, 153)));
        txtDisponible.setOpaque(false);
        pnlDetalle.add(txtDisponible);

        pnlTabla.setLayout(new java.awt.BorderLayout());

        tblAgenda.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tblAgenda.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        scrListado.setViewportView(tblAgenda);

        pnlTabla.add(scrListado, java.awt.BorderLayout.CENTER);

        javax.swing.GroupLayout pnlPedidosLayout = new javax.swing.GroupLayout(pnlPedidos);
        pnlPedidos.setLayout(pnlPedidosLayout);
        pnlPedidosLayout.setHorizontalGroup(
            pnlPedidosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlPedidosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlPedidosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(pnlTabla, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 419, Short.MAX_VALUE)
                    .addComponent(pnlDetalle, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 419, Short.MAX_VALUE))
                .addContainerGap())
        );
        pnlPedidosLayout.setVerticalGroup(
            pnlPedidosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlPedidosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlTabla, javax.swing.GroupLayout.DEFAULT_SIZE, 274, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlDetalle, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pnlContenedor.add(pnlPedidos, java.awt.BorderLayout.CENTER);

        getContentPane().add(pnlContenedor, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCobranza;
    private javax.swing.JButton btnCotizacion;
    private javax.swing.JButton btnDevolucion;
    private javax.swing.JButton btnProforma;
    private javax.swing.JButton btnRegistroSello;
    private javax.swing.JButton btnTomarPedidos;
    private com.toedter.calendar.JCalendar dchCalendario;
    private javax.swing.JLabel lblAgenda;
    private javax.swing.JLabel lblClaseRiesgo;
    private javax.swing.JLabel lblDisponible;
    private javax.swing.JLabel lblLimiteCredito;
    private javax.swing.JToolBar mnuToolBar;
    private javax.swing.JPanel pnlCalendario;
    private javax.swing.JPanel pnlContenedor;
    private javax.swing.JPanel pnlDetalle;
    private javax.swing.JPanel pnlPedidos;
    private javax.swing.JPanel pnlTabla;
    private javax.swing.JScrollPane scrListado;
    private javax.swing.JTable tblAgenda;
    private javax.swing.JTextField txtClaseRiesgo;
    private javax.swing.JTextField txtDisponible;
    private javax.swing.JTextField txtLimiteCredito;
    // End of variables declaration//GEN-END:variables
}
